P2P connection technology is widely applied on internet for data transmission and download. In a network shown in FIG. 1, in normal cases, when a client has logged in a server and obtained the address of a to-be-connected client, the first client can initiate a P2P connection to the to-be-connected client. A P2P connection establishment process is explained herein with reference to the data download process executed by BitTorrent (BT), as shown in FIG. 2.
BT is an application used for downloading files through P2P connections, which allows a peer to upload data to other peers while downloading data so that the peers may transmit downloaded data to one another. The data download process performed by BT for a peer, taking Peer A as an example, comprises the following steps:
Step 201: acquiring, by the BT client application of Peer A, from internet an information file with “.torrent” as the file name extension, the information file providing the addresses of the tracker(s) that offers BT download service; accessing the tracker(s) by the BT client application of Peer A, uploading the address and download demand of Peer A onto the tracker(s);
Step 202-203: acquiring a corresponding peerlist by the tracker(s) according to the download requested by Peer A, searching the peerlist based on certain policies, choosing several pieces of peer information and sending the peer information to Peer A; the peer information including the peers that offer data download and the peers that demand data upload;
Step 204-205: choosing the peer(s) that offers data download by Peer A according to certain policies upon receiving the peer information, initiating a Transmission Control Protocol (TCP) connection request directly to the peer(s), establishing a P2P connection to the peer(s) and starting to download data; choosing the peer(s) that demands data upload, initiating a TCP connection request directly to the peer(s), establishing a P2P connection to the peer(s) and starting to upload data;
Step 206: reporting upload and download rates and the download result by Peer A to the tracker(s) regularly and obtaining real-time updated peerlist.
BT application has the following disadvantages:
1) BT can only establish TCP based P2P connections for data transmission between peers while TCP can not fulfill the requirements of real-time transmission in certain applications, e.g., real-time multimedia data transmission based on User Datagram Protocol (UDP);
2) more importantly, in the P2P connection establishment process, only the peer that initiates the P2P connection establishment process may initiate a connection, which results in very low connection rate.
In a common P2P connection establishment process in the prior art, it is also true that only the peer that initiates the P2P connection establishment process, not the peer to be connected, may initiate a connection. For example, when a user is connected to internet through a client application and the user initiates a P2P connection to a tracker on internet to download data, only the user will be allowed to initiated the process of establishing the P2P connection to the server, the server, as the terminal to be connected, will not be allowed to initiate a P2P connection to the user. Therefore, if the P2P connection initiated by the user fails to reach the server, or the user fails to initiate the P2P connection, the P2P connection establishment will fail and the connection rate is thus low.